|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcontrol.Logic
public class Logic
Starts the computation of the simulation. Saves or load if needed for simulation
| Field Summary | |
|---|---|
static State |
s
|
static boolean |
saved
|
static double |
weather
|
static double |
weekweather
|
| Constructor Summary | |
|---|---|
Logic()
|
|
| Method Summary | |
|---|---|
static void |
begin()
Call to start the simulation |
static void |
loadState(java.lang.String filename)
Loads state from the file |
static void |
runSimulation()
Runs the simulation for the week and updates the field values (Calculates the success rate) |
static void |
saveState(java.lang.String filename)
Saves the state to a file |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static State s
public static double weather
public static double weekweather
public static boolean saved
| Constructor Detail |
|---|
public Logic()
| Method Detail |
|---|
public static void begin()
public static void runSimulation()
public static void saveState(java.lang.String filename)
filename: - File namespace the file is saved topublic static void loadState(java.lang.String filename)
filename: - loads the field values from the state
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||